#ifndef COMMON_H
#define COMMON_H

#include <iostream>
#include <vector>



using namespace std;

typedef unsigned int UINT;

//define a data struct that describe information of a relay-node during walks 
struct relayNode 
{
       UINT nodeID;
       UINT visitedNum;
       UINT homeFlag;
       float totalConductance;
       float injectCurrent;
       float voltage; 
};

//define a data struct that describe information of a neighbor node
struct nbrNode
{
      UINT nodeID;
      UINT branchID;
      UINT homeFlag;       //the walk is stopped at this node if it is "1"
      float totalConductance;
      float conductance;
      float probability;
      float injectCurrent;
      float voltage;
};

//define a data struct that describe information of a node
struct NODE
{
       UINT nodeID;
       UINT nbrNums;
       UINT exactHomeFlag;                   //it is a voltage source or ground    
       UINT unexactHomeFlag;                 //is is considered as a home after it estimated its voltage
       vector <relayNode> visitedNodes;      //record whcih nodes he has visited
       vector <relayNode> BeenVisitedNodes;  //record whcih nodes he has been visited
       vector <nbrNode> neighborNodes;       //record his neighbors
       float voltage;
       float injectCurrent;
       float totalConductance;
};

#endif
